﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace DependencyPropertyTestDemo
{
    public class Control2 : ContentControl
    {
        /// <summary>
        /// 共享的附加属性
        /// </summary>
        public int Prop
        {
            get { return (int)GetValue(PropProperty); }
            set { SetValue(PropProperty, value); }
        }
        public static readonly DependencyProperty PropProperty =
            Control1.PropProperty.AddOwner(typeof(Control2),
                new FrameworkPropertyMetadata(default(int), FrameworkPropertyMetadataOptions.Inherits));

    }
}
